import java.sql.SQLOutput;

public class Test {
    public static void main25(String[] args) {
        for(int i = 0; i < 99999; i++) {
            //1.求当前数字i是一个几位数
            int count = 0;
            int tmp = i;
            while (tmp != 0) {
                count++;
                tmp /= 10;
            }
            tmp = i;
            int sum = 0;
            while(tmp != 0) {
                sum += Math.pow(tmp % 10,count);
                tmp /= 10;
            }
            if(sum == i) {
                System.out.println(count+" 位的自幂数为： "+i);
            }
        }
    }

    public static void main24(String[] args) {
        int n = 7;
        int i = 2;
        for(; i <= Math.sqrt(n); i++) {
            if(n % i == 0) {
                System.out.println("不是素数！");
                break;
            }
        }
        if(i > Math.sqrt(n)) {
            System.out.println("是素数！");
        }

    }

    public static void main23(String[] args) {
        int n = 9;
        int i = 2;
        for(; i <= n/2; i++) {
            System.out.println("不是素数");
            break;
        }
        if(i > n/2) {
            System.out.println("是素数");
        }
    }

    public static void main22(String[] args) {
        int n = 9;
        int i = 2;
        for(; i <= n -1; i++) {
            if(n % i == 0) {
                System.out.println("不是素数");
                break;
            }
        }
        if(i > n -1) {
            System.out.println("是素数");
        }
    }

    public static void main21(String[] args) {
        int num = 1;
        do {
            System.out.println(num);
            num++;
        } while(num <= 0);
    }

    public static void main20(String[] args) {
//        for(int i =1; ;i++) {
//            System.out.println("傻了吧!!!");
//        }
//        while(true) {
//            System.out.println("傻了吧!!!");
//
//        }
    }

    public static void main19(String[] args) {
        int sum = 0;
        for(int j = 1; j <= 5; j++) {
            int ret = 1;
            for(int i = 1; i <= 5; i++) {
                ret *= i;
            }
            sum += ret;
        }
        System.out.println(sum);
    }

    public static void main18(String[] args) {
        int ret = 1;
        for(int i = 1; i <= 5; i++) {
            ret *= i;
        }
        System.out.println(ret);

    }

    public static void main17(String[] args) {
        int sum = 0;
        for(int i = 1; i < 101; i++) {
            sum += i;
        }
        System.out.println(sum);
    }

    //找出1-100之间既能被3整除  也能被4整除的所有数字
    public static void main16(String[] args) {
        int i = 1;
        while(i <= 100) {
            if(i % 12 != 0) {
                i++;
                continue;
            }
            System.out.println(i+" ");
            i++;
        }
    }

    public static void main15(String[] args) {
        int i = 100;
        while(i <= 200) {
            if(i % 3 != 0) {
                i++;
                continue;
            }
            System.out.println(i+" ");
            i++;
        }
    }

    public static void main14(String[] args) {
        int i = 100;
        while(i <= 200) {
            if(i % 3 == 0) {
                System.out.println(i);
                i++;
                continue;
            }
            i++;
        }
    }

    public static void main13(String[] args) {
        int i = 100;
        while(i <= 200) {
            if(i % 3 == 0) {
                System.out.println(i);//只打印一个102
                break;
            }
            i++;
        }
    }

    public static void main12(String[] args) {
        int a = 1;
        while(a <= 10) {
            if(a == 3) {
                a++;
                continue;
            }
            System.out.println(a+"");
            a++;
        }
    }

    public static void main11(String[] args) {
        int a = 1;
        while(a < 10) {
            System.out.println("haha");
            a++;
        }
        a = 1;
        while(a < 10) {
            while(a < 5) {
                System.out.println("fafa");
                a++;
            }
            a++;
        }

    }

    public static void main10(String[] args) {
        int j = 1;
        int sum = 0;
        while(j <= 5) {
            int i = 1;
            int ret = 1;
            while(i <= 5) {
                ret *= i;
                i++;
            }
            sum += ret;
            j++;
        }
        System.out.println(sum);
    }

    public static void main9(String[] args) {
        int i = 1;
        int ret = 1;
        while(i <= 5) {
            ret *= i;
            i++;
        }
        System.out.println(ret);
    }

    public static void main8(String[] args) {
        int i = 1;
        int sum = 0;
        while(i <= 100) {
            sum += i;
            i += 2;
        }
        System.out.println(sum);
    }

    public static void main7(String[] args) {
        int i = 1;
        while(i <= 10) {
            System.out.println(i+"");
            i++;
        }
    }

    public static void main6(String[] args) {
//        double a = 6.0f;
//        boolean a = true;
        int a = 1;
        String str = "abcd";
        switch(str) {
            case "abcd":
                System.out.println("1");
                break;
//            case 2:
//                System.out.println("2");
//                break;
//
//            case 3:
//                    System.out.println("3");
//                    break;
            default:
                System.out.println("匹配失败");
                break;

            }
        }


    public static void main5(String[] args) {
        int a = 20;
        if(a == 10) {
            System.out.println("a == 10");
        }
    }

    public static void main4(String[] args) {
        int year = 2005;
        if(year % 100 != 0) {
            if (year % 4 == 0) {
                System.out.println(year + "是闰年");
            } else {
                System.out.println(year + "不是闰年");
            }
        }
            else {
                if(year % 400 ==0) {
                    System.out.println(year+"是闰年");
                }else {
                    System.out.println(year+"不是闰年");
                }
            }
        }


    public static void main3(String[] args) {
        int a = 14;
        if(a % 2 ==0){
            System.out.println(a + "是偶数");//14是偶数
        }else{
            System.out.println(a + "是奇数");
        }
    }

    public static void main2(String[] args) {
        int a = 10;
        if(a > 10) {
            System.out.println("a > 10");
        }else if(a < 10){
            System.out.println("a < 10");
        }else{
            System.out.println("a == 10");
        }

    }

    public static void main1(String[] args) {
        System.out.println("aaa");
        System.out.println("ccc");
        System.out.println("bbb");
    }
}
